package com.hbnu.test.www.Human;

public class Grandson extends Son {
    static {
        System.out.println("Grandson's message:");
    }

//    public Grandson(String name, int id) {
//        this.name = name;
//        this.id = id;
//    }

    private String name = "Liu Chen";
    private int id = 3;

    public Grandson(String name, int id) {
        super(name, id);//调用有参构造，不需要再写了
    }

    public void introduction() {
        System.out.println("name: " + name + ", id: " + id + ".");
    }

}
